package zb.lambda;

import zb.stream.User;

import java.util.stream.Stream;
import java.util.stream.DoubleStream;

/**
 * @author wzby
 * @Date: 2022/8/5 20:22
 */
public class Lam3 {
    public static void main(String[] args) {
        Stream<User> us = Stream.of(new User("java",123,4));
        //rus.filter(User::show);
        us.filter(u -> u.show());
        //us.filter(e->java.lang.Math.random() > .5);
        DoubleStream.generate(java.lang.Math::random).limit(3);
        DoubleStream.generate(java.lang.Math::random).limit(3);

        Stream<User> usus1 = Stream.generate(() -> new User());

        Stream<User> usus2 = Stream.generate(User::new);
    }
}
